package com.customer.crm.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.customer.crm.system.pojo.Task;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * The interface Task mapper.
 *
 * @author Lyp
 * @create 2021 /12/20
 */
@Mapper
public interface TaskMapper extends BaseMapper<Task> {

    /**
     * Find all task list.
     * 分页查询
     *
     * @param page   the page
     * @param rows   the rows
     * @param taskId the task id
     * @return the list
     */
    List<Task> findAllTask(@Param("page") Long page, @Param("rows") Long rows, @Param("taskId") Integer taskId);

    /**
     * Find my task list.
     * 我的任务
     *
     * @param systemUsername the system username
     * @return the list
     */
    List<Task> findMyTask(@Param("systemUsername") String systemUsername);

    /**
     * My distribute task list.
     * 我分配的任务
     *
     * @param systemUsername the system username
     * @return the list
     */
    List<Task> myDistributeTask(@Param("systemUsername") String systemUsername);


    /**
     * End today list.
     * 今天截止
     *
     * @return the list
     */
    List<Task> endToday();

    /**
     * End week list.
     * 本周截止
     *
     * @return the list
     */
    List<Task> endWeek();

    /**
     * End month list.
     * 本月截止
     *
     * @return the list
     */
    List<Task> endMonth();


}
